package sprinklerbee.dao;

import java.util.List;
import sprinklerbee.model.Group;
import sprinklerbee.model.Scheduler;
import sprinklerbee.model.SchedulerHistory;

public interface SchedulerDAO {
	public boolean addScheduler(Scheduler scheduler) throws RuntimeException;
	public boolean addSchedulerConsumption(List<SchedulerHistory> list) throws RuntimeException;
	public boolean addSchedulers(List<Scheduler> scheduler) throws RuntimeException ;
	public boolean delelteScheduler(Scheduler scheduler) throws RuntimeException;
	public boolean updateSchedulerBySprinkler(Scheduler scheduler) throws RuntimeException;
	public boolean updateSchedulersByGroup(Group group,Scheduler scheduler) throws RuntimeException;
	public boolean updateAllSchedulers(Scheduler scheduler) throws RuntimeException;
	public Scheduler querySchedulerById(int id) ;
	public List<Scheduler> queryAllSchedulers();
	public List<Scheduler> querySchedulersForToday();
	public List<Scheduler> querySchedulersBySprinkler(String sprinklerName) ;
	public List<Scheduler> querySchedulersByGroup(String groupName);
	public List<Scheduler> querySchedulersRealTime();
	public List<SchedulerHistory> querySchedulerHistoryBySprinklerId(int sprinklerId);
	public List<SchedulerHistory> querySprinklerConsumption();
	public List<SchedulerHistory> queryGroupConsumption();
	public List<SchedulerHistory> queryGroupConsumption(String groupName);
	public double queryMonthlyConsumption(String month);
}
